package com.cloudlinkscm.loms.services.base.notify.code;

import com.cloudlinkscm.loms.framework.core.pojo.ErrorCode;
import com.cloudlinkscm.loms.framework.core.pojo.ErrorMessage;
import com.cloudlinkscm.loms.framework.core.pojo.Language;

import java.util.HashMap;

/**
 * @author : tac
 * @date : 2017/5/22
 */
public enum NotifyCenterErrorCode implements ErrorCode {
    CCLS_INVALID_FORMAT_EXCEPTION("101"),
    MESSAGE_NOT_FOUND_EXCEPTION("102");

    private String code;
    NotifyCenterErrorCode(String code) {
        this.code = code;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return errorMessage.getErrorMessage(this);
    }

    @Override
    public String getInternationalMessage(Language language) {
        return errorMessage.getInternationalErrorMessage(this, language);
    }

    @Override
    public String getInternationalMessage(Language language, Object... args){
        return errorMessage.getInternationalErrorMessage(this, language, args);
    }

    private static HashMap<ErrorCode, String> zh = new HashMap<>();
    private static HashMap<ErrorCode, String> en = new HashMap<>();
    static {
    }
    static {
    }
    private static ErrorMessage errorMessage = new ErrorMessage(zh, en);
}
